<?php

namespace pmvc\tx;

interface Transaction {

	/**
	 * Starts the transation.
	 */
	public function start();

	/**
	 * Commits the transaction.
	 */
	public function commit();

	/**
	 * Rolls back the transaction.
	 */
	public function rollback();

	/**
	 * Enables are disables auto commit.
	 * @param bool $autoCommit
	 */
	public function setAutoCommit($autoCommit);
	
	/**
	 * Checks to see if auto commit is
	 * enabled or disabled.
	 * @return bool
	 */
	public function isAutoCommit();
	
	/**
	 * Checks to see if the transaction is
	 * commited.
	 * @return bool
	 */
	public function isCommited();
	
	/**
	 * Checks to see if the transaction is
	 * rolled back.
	 * @return bool
	 */
	public function isRolledBack();
	
}
?>